package com.mjw.zstu.controller;

import com.mjw.zstu.entity.Exhibitor;
import com.mjw.zstu.resultDto.JsonResult;
import com.mjw.zstu.service.ExhibitorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("exhibitor")
@CrossOrigin
public class ExhibitorController {
    @Autowired
    ExhibitorService exhibitorService;
    @RequestMapping("/attend")
    public JsonResult attend(@RequestBody Exhibitor exhibitor){
//        Exhibitor exhibitor=new Exhibitor();
//        exhibitor.setExhibition_id(1);
        return exhibitorService.join(exhibitor);
    }
}
